package com.soap.ResumeAim.controller;

import com.hankcs.hanlp.seg.common.Term;
import com.soap.ResumeAim.service.ResumeService;
import com.soap.ResumeAim.controller.req.IdentifyReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: Soap
 * @date: 2021/11/1
 * @desc:
 */
@RequestMapping("/resume")
@RestController
public class ResumController {

    @Autowired
    private ResumeService resumeService;

    @PostMapping("/identify")
    public List<String> identify(@RequestBody IdentifyReq req) {

        try {
            return resumeService.indentifyResume(req);
        }catch (Exception e){
            e.printStackTrace();
        }

        return null;
    }

    @RequestMapping("/analyze")
    public List<String> analyze(){
        resumeService.analyzeResume("");

        return null;
    }
}
